import request from "@/api";
import { PageQuery, PageRet } from "../../response";

class AuditLogApi {
  /**
   * 查询
   * @param data
   * @returns
   */
  static async query(data: AuditLogQuery): Promise<PageRet<AuditLog>> {
    return await request({
      url: "/auditLog/index",
      method: "post",
      data: data,
    });
  }
}

export default AuditLogApi;

export interface AuditLog {
  createTime?: string;
  createBy?: string;
  method?: string;
  requestUrl?: string;
  requestParameters?: string;
  requestIp?: string;
  ipAddress?: string;
  operatingSystem?: string;
  deviceType?: string;
  browserName?: string;
  version?: string;
  executionDuration?: string;
  responseData?: string;
}

export interface AuditLogQuery extends PageQuery {
  searchString?: string;
}
